<?php
require("db_info.inc.php");
$sql="select * from ctd_menu where mn_parent=0 order by mn_order;";
$ret = mysql_query($sql);

while ($row = mysql_fetch_array($ret)) {
	
	echo '<li class="lev1"><a title="'.$row['mn_notes'].'" href="'.$row['mn_link'].'" class="sf-with-ul">'.$row['mn_name'].'</a>';
	$sql="select * from ctd_menu where mn_parent=".$row['id']." order by mn_order;";
	$ret2=mysql_query($sql);
	if (mysql_num_rows($ret2)) {
		echo '<ul style="float: none; display: none; visibility: hidden;">';
		while ($row2 = mysql_fetch_array($ret2)) {
			echo '<li style="white-space: normal; float: left; width: 100%;"><a style="float: none; width: auto;" title="'.$row2['mn_notes'].'" href="'.$row2['mn_link'].'" class="sf-with-ul">'.$row2['mn_name'].'</a></li>';
		}
		echo '</ul>';
	}
	echo '</li>';
	
}

?>